<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <th:block th:include="include :: header('修改专家动态')"/>
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
    <form class="form-horizontal m" id="form-expertDynamic-edit" th:object="${expertDynamic}">
        <input name="dynamicId" th:field="*{dynamicId}" type="hidden">
        <div class="form-group">
            <label class="col-sm-3 control-label">会员ID：</label>
            <div class="col-sm-8">
                <select name="memberId" class="form-control m-b" required>
                    <option value="">所有</option>
                </select>
                <span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 代码生成请选择字典属性</span>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label is-required">动态标题：</label>
            <div class="col-sm-8">
                <input name="title" th:field="*{title}" class="form-control" type="text" required>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">动态内容：</label>
            <div class="col-sm-8">
                <textarea name="content" class="form-control" required>[[*{content}]]</textarea>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">阅读数：</label>
            <div class="col-sm-8">
                <input name="readCount" th:field="*{readCount}" class="form-control" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">图片地址，分割：</label>
            <div class="col-sm-8">
                <textarea name="img" class="form-control">[[*{img}]]</textarea>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">点赞数：</label>
            <div class="col-sm-8">
                <input name="likeCount" th:field="*{likeCount}" class="form-control" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">评论数：</label>
            <div class="col-sm-8">
                <input name="commentCount" th:field="*{commentCount}" class="form-control" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label is-required">来源系统名称：</label>
            <div class="col-sm-8">
                <input name="sysName" th:field="*{sysName}" class="form-control" type="text" required>
            </div>
        </div>
    </form>
</div>
<th:block th:include="include :: footer"/>
<script type="text/javascript">
    var prefix = ctx + "agriculture/expertDynamic";
    $("#form-expertDynamic-edit").validate({
        focusCleanup: true
    });

    function submitHandler() {
        if ($.validate.form()) {
            $.operate.save(prefix + "/edit", $('#form-expertDynamic-edit').serialize());
        }
    }
</script>
</body>
</html>